<?php

class Item{
	var $value ;
	var $text ;
	var $selected ;

	function Item($value,$text,$selected){
		$this->value = $value ;
		$this->text  = $text ;
		$this->selected = $selected ;
	}

	function getOptionHTML(){
		$html  = "<option value='".$this->value."'";
		if($this->selected){
			$html .= " selected";
		}
		$html .= ">";
		$html .= $this->text ;
		$html .= "</option>";
		return $html ;
	}

	function getRadioHTML(){
		$html  = "<radio class='radio' value='".$this->value."'";
		if($this->selected){
			$html .= " checked";
		}
		$html .= ">";
		$html .= $this->text."&nbsp;" ;
		return $html ;
	}

	function getCheckboxHTML(){
		$html  = "<checkbox class='checkbox' value='".$this->value."'";
		if($this->selected){
			$html .= " checked";
		}
		$html .= ">";
		$html .= $this->text."&nbsp;" ;
		return $html ;
	}
}

?>